<template>
  <nav class="nav">
    <div class="nav-view flex-sp">
      <img :src="require('@/assets/logo.png')" alt="" class="nav-logo" @click="$router.push('/')" title="返回首页">
      <div class="nav-ul">
        <div class="nav-li" v-for="(v, i) in navList" :key="i" @click="$router.push(v.router)">{{v.name}}</div>
      </div>
    </div>
  </nav>
  
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      navList: [
        {
          name: '首页',
          router: '/'
        },{
          name: '手机APP安装',
          router: 'download'
        },
        {
          name: '大数据收费标准',
          router: ''
        },
        {
          name: '汽车经销商ERP',
          router: ''
        },
        {
          name: '关于我们',
          router: 'about'
        }
      ]
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.nav {
  z-index: 999;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  .nav-view {
    width: 1200px;
    height: 100%;
  }
  .nav-logo {
    width: 194px;
    height: 56px;
    cursor: pointer;
  }
  .nav-ul {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav-li {
    font-size: 16px;
    font-family: Alibaba PuHuiTi;
    font-weight: 800;
    line-height: 41px;
    color: #333333;
    margin-right: 20px;
    cursor: pointer;
  }
}
</style>
